package test;

public class T {
    public boolean findNumberIn2DArray(int[][] matrix, int target) {
        for(int i = 0;i < matrix.length;i++){
            for (int j = 0; j < matrix[0].length; j++) {
                if(target < matrix[i][0]) {
                    break;
                }else if (target == matrix[i][0]){
                    return true;
                }
            }
        }
        return false;
    }
}
